import request from '@/utils/request'

/**
 * 获取角色列表
 * ***/
export function getRoleList(params) {
  return request({
    url: '/sys/role',
    params
  })
}

// 更具id查询公司信息
export const getCompanyInfo = (id) => request.get(`/company/${id}`)

// 删除角色
export const deleteRole = (id) => request.delete(`/sys/role/${id}`)

// 获取角色详情
export const getRoleDetail = (id) => request.get(`/sys/role/${id}`)

// 编辑角色
export const updateRole = (obj) => request.put(`/sys/role/${obj.id}`, obj)

// 添加角色
export const addRole = (obj) => request.post('/sys/role', obj)

// 给角色分配权限
export const assignPerm = (obj) => request.put('/sys/role/assignPrem', obj)

